﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OpenQuarters.WebQuarters.Core
{
    public partial class UserToken : CMSEntity<UserToken, string>
    {
        public override System.Linq.Expressions.Expression<Func<UserToken, bool>> GetIDSelector(string ID)
        {
            return e => e.UserTokenId == ID;
        }

        public override string GetKey(UserToken Entity)
        {
            return Entity.UserTokenId;
        }

        public override bool IsNew(UserToken Entity)
        {
            return Table.FirstOrDefault(e => e.UserTokenId == Entity.UserTokenId) == null;
        }

        public override void OnSaving()
        {
            base.OnSaving();
            this.LoggingMode = LoggingMode.Off;
        }
    }
}
